package org.byqh.dqeai.entity;

import com.easy.query.core.annotation.Column;
import com.easy.query.core.annotation.EntityFileProxy;
import com.easy.query.core.annotation.Table;
import com.easy.query.core.proxy.ProxyEntityAvailable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.byqh.dqeai.entity.proxy.SysAccessLogProxy;

import java.time.LocalDateTime;

/**
 * 实体类。
 *
 * @author easy-query-plugin automatic generation
 * @since 1.0
 */
@Data
@Schema(name = "SysAccessLog", description = "$table.comment")
@Table(value = "SYS_ACCESS_LOG")
@EntityFileProxy
public class SysAccessLog implements ProxyEntityAvailable<SysAccessLog, SysAccessLogProxy> {

    /**
     * 日志ID
     */
    @Schema(description = "日志ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @Column(primaryKey = true, value = "LOG_ID")
    private String logId;

    /**
     * 应用ID
     */
    @Schema(description = "应用ID")
    @Column(value = "APP_ID")
    private String appId;

    /**
     * 用户帐号
     */
    @Schema(description = "用户帐号", requiredMode = Schema.RequiredMode.REQUIRED)
    @Column(value = "USER_CODE")
    private String userCode;

    /**
     * 用户IP地址
     */
    @Schema(description = "用户IP地址")
    @Column(value = "USER_IP")
    private String userIp;

    /**
     * 登录时间,默认系统时间
     */
    @Schema(description = "登录时间,默认系统时间", example = "yyyy-MM-dd HH:mm:ss")
    @Column(value = "LOGIN_TIME")
    private LocalDateTime loginTime;

    /**
     * 0登录失败;1登录成功
     */
    @Schema(description = "0登录失败;1登录成功")
    @Column(value = "LOGIN_STATUS")
    private String loginStatus;

    /**
     * 记录登录失败的原因
     */
    @Schema(description = "记录登录失败的原因")
    @Column(value = "LOGIN_DES")
    private String loginDes;

    /**
     * 退出系统时间
     */
    @Schema(description = "退出系统时间", example = "yyyy-MM-dd HH:mm:ss")
    @Column(value = "LOGOUT_TIME")
    private LocalDateTime logoutTime;

    /**
     * 备注信息
     */
    @Schema(description = "备注信息")
    @Column(value = "REMARKS")
    private String remarks;

    @Column(value = "OS_VERSION")
    private String osVersion;

    @Column(value = "OS_ARCH")
    private String osArch;

    @Column(value = "USER_NAME")
    private String userName;

    @Column(value = "USER_DEPT")
    private String userDept;
}
